package com.palm.platform.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;

import java.io.Serializable;
import java.sql.Types;

@Data
@Entity(tableName=RolePermission.TABLE)
public class RolePermission implements Serializable {
    public static final String TABLE="t_role_permission";
    @Id
    @Column(name="role",length=20L,type= Types.VARCHAR,nullable=false)
    private String role;
    @Id
    @Column(name="permission",length=20L,type=Types.VARCHAR,nullable=false)
    private String permission;

    public RolePermission(){

    }

    public RolePermission(String role, String permission) {
        this.role = role;
        this.permission = permission;
    }
}
